'''
Author: Sjy
Description: 等值面界面
'''

# -*- coding: utf-8 -*-

from PyQt5 import  QtWidgets, QtCore, QtGui

from .ui_tableToolboxEditedDataList import Ui_tableToolboxEditedDataList

class Ui_isourface(QtWidgets.QWidget):
    def setupUi(self, parent):
        parent.resize(800, 600)
        layout = QtWidgets.QVBoxLayout()
        self.widget = Ui_tableToolboxEditedDataList({
            'valueType': 'float'
        })
        # 底部工具行
        toolBox = QtWidgets.QHBoxLayout()
        btnApply = QtWidgets.QPushButton('应用')
        btnApply.setObjectName('btnApply')
        btnOk = QtWidgets.QPushButton('确定')
        btnOk.setObjectName('btnOk')
        btnRecover = QtWidgets.QPushButton('恢复')
        btnRecover.setObjectName('btnRecover')
        btnCancel = QtWidgets.QPushButton('取消')
        btnCancel.clicked.connect(parent.reject)
        toolBox.addStretch(1)
        toolBox.addWidget(btnApply)
        toolBox.addWidget(btnOk)
        toolBox.addWidget(btnRecover)
        toolBox.addWidget(btnCancel)
        # 主容器添加内容
        layout.addWidget(self.widget)
        layout.addLayout(toolBox)
        parent.setLayout(layout)

        parent.setWindowTitle(' ')
        # 使用object name 关联槽函数
        QtCore.QMetaObject.connectSlotsByName(parent)
    def get(self):
        return self.widget._get() 
    def set(self, data:list=[]):
        self.widget._set(data) 

